import request from "@/utils/request";

// 查询所有数据列表
export function getPlayData(data) {
  return request({
    url: "/player/data/list/all",
    method: "get",
    params: data,
  });
}

// 获取玩家的数据
export function searchPlayData(data) {
  return request({
    url: "/player/data/search",
    method: "get",
    params: data,
  });
}

// 获取玩家的数据
export function searchPlayDataByPlayer(data) {
  return request({
    url: "/player/data/search_by_player",
    method: "get",
    params: data,
  });
}

// 获取玩家的数据
export function searchPlayDataByRoom(data) {
  return request({
    url: "/player/data/search_by_room",
    method: "get",
    params: data,
  });
}




// 添加或更新一条数据记录
export function addOrUpdatePlayData(data) {
  return request({
    url: "/player/data/addOrUpdate",
    method: "post",
    data,
  });
}


// 添加或更新一条数据记录
export function deletePlayData(data) {
  return request({
    url: "/player/data/delete",
    method: "get",
    params: data,
  });
}
